package com.party.core.model.crowdfund;

import com.party.core.model.BaseModel;

import java.util.Date;
import java.util.Objects;

/**
 * @ClassName CrowdfundEventGradation
 * @Description 主题阶段信息
 * @Author yifeng
 * @Date 2019/3/20 9:25
 **/
public class EventGradation extends BaseModel {

    private Date endTime; // 截止时间
    private String endDate; // 保存用到的

    private Double price; // 金额

    private String cityId; // 城市id
    private String cityName; // 城市名称 显示用的

    private String area; // 区域

    private String place; // 活动场所

    private Integer limitNum; // 人数上限

    private String eventId; // 主题id

    private Integer gradation; // 阶段数

    private Integer challengeState; // 是否继续挑战  返回字段  数据库没有

    public Integer getChallengeState() {
        return challengeState;
    }

    public void setChallengeState(Integer challengeState) {
        this.challengeState = challengeState;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public Integer getLimitNum() {
        return limitNum;
    }

    public void setLimitNum(Integer limitNum) {
        this.limitNum = limitNum;
    }

    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    public Integer getGradation() {
        return gradation;
    }

    public void setGradation(Integer gradation) {
        this.gradation = gradation;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        EventGradation that = (EventGradation) o;
        return Objects.equals(endTime, that.endTime) &&
                Objects.equals(price, that.price) &&
                Objects.equals(cityId, that.cityId) &&
                Objects.equals(area, that.area) &&
                Objects.equals(place, that.place) &&
                Objects.equals(limitNum, that.limitNum) &&
                Objects.equals(eventId, that.eventId) &&
                Objects.equals(gradation, that.gradation);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), endTime, price, cityId, area, place, limitNum, eventId, gradation);
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
}
